<template>
	<view>
		<view class="user-block m-0 rubik-list" :style="{minHeight:'calc('+new_param.style==0?0:(new_param.new_minHeight-new_param.space)+')',margin:-new_param.space,width:'calc(100% + '+new_param.space+')',height:'calc(100% + '+new_param.space+')'}">
        <view class="rubik-one" :style="{width:item.new_width,height:new_param.style==0?'auto':item.new_height,position:new_param.style==0?'relative':'absolute',left:item.new_left,top:item.new_top}" v-for="(item,index) in new_param.list" v-key="item.id">
            <form @submit="$emit('_formIdSubmit',$event)" :data-type="item.open_type=='wxapp'?'':'navigate'" :data-url="item.page_url" reportSubmit="true">
                <button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
                    <navigator :appId="item.appId" @tap="$emit('navigatorClick',$event)" class="fs-0" :data-url="item.url" hoverClass="none" openType="navigate" :path="item.path" style="display:block;width: 100%;z-index:9;position:relative;" :style="new_param.style==0?'height:auto;':'height:'+item.new_height" :target="item.open_type=='wxapp'?'miniProgram':''" :url="item.url">
                        <image lazyLoad="true" :mode="new_param.style==0?'widthFix':'aspectFill'" :src="item.pic_url" style="width:100%;height:100%;display:block"></image>
                    </navigator>
                </button>
            </form>
        </view>
    </view>
	</view>
</template>

<script>var myVue = {};
	export default {
		props:['param'],
		computed: {
			new_param() {
				var obj = this.param
				obj.space = uni.upx2px(obj.space) + 'px';
				obi.list.forEach(function(e){
					e.new_width = uni.upx2px(e.new_width) + 'px';
					e.new_height = uni.upx2px(e.new_height) + 'px';
					e.new_left = uni.upx2px(e.new_left) + 'px';
					e.new_top = uni.upx2px(e.new_top) + 'px';
				})
				return obj
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style scoped>
	
</style>
